﻿
using HandyControlDemo.Model;
using System.Collections.ObjectModel;

namespace HandyControlDemo.ViewModel
{
    class MainWindowViewModel : CommunityToolkit.Mvvm.ComponentModel.ObservableObject
    {
        private ObservableCollection<DemoDataModel> dataList;
        public ObservableCollection<DemoDataModel> DataList
        {
            get => dataList;
            set => SetProperty(ref dataList, value);
        }

        private int selectedIndex;
        public int SelectedIndex
        {
            get { return selectedIndex; }
            set
            {
                selectedIndex = value;
                OnPropertyChanged("SelectedIndex");
            }
        }

        public MainWindowViewModel()
        {
            SelectedIndex = -1;
            DataList = GetDataList();
        }

        private ObservableCollection<DemoDataModel> GetDataList()
        {
            //string name = Properties.Lang.ResourceManager.GetString("Button");
            return new ObservableCollection<DemoDataModel>
            {
                new DemoDataModel{ ImgPath = "pack://application:,,,/Resource/Image/LeftMainContent/Brush_16x.png", Name = "[上午]流程三数据格式转换-统计选手得分"},


            };
        }
    }
}
